<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>线性渐变</title>
  <style type="text/css">
    p{
      width: 200px;
      height: 200px;
      background-image: linear-gradient(30deg,#0f0,red);
    }
  </style>

</head>
<body>
<p></p>
</body>
</html>